home *** CD-ROM | disk | FTP | other *** search
- In addition to the sample macros you will find in recent Uniterm
- documents in versions (2.0d and later), I have included here
- three macros I have used for a long time to do auto-dialing on
- BBS's. Before I removed phone numbers, system prompts and
- responses, and login names and passwords, these macros and all
- their features were known to work well and perform all the
- claimed functions. Unfortunately, when this information is
- removed, the macros will no longer work. Also, by their nature
- each person's system, modem, desired features, etc. will be
- different. Within the constraints of the maximum 4k file size of
- these macros for Uniterm 2.0d and later, I have included all the
- comments I could to explain what I was doing. I'm sorry if some
- of these comments appear quite cryptic.
-
- To use these macros, you must put them in a word processor that
- will write them to an ASCII file with no control codes. Make
- sure you name the files the same names you intend to use in the
- Auto-dialer, Function Keys, or other macro you call them from.
- When you see "loadsetup" near the beginning of each file, you are
- to enter in the blank space following the name of the setup file
- you want to use when this BBS is called. Inspect closely the
- codes sent to the modem to control its features. Although my
- modem is an Atari Hayes compatible, these will most likely have
- to be changed or removed for your equipment and are included as
- examples. When these macros are called, they must be in the
- default directory that Uniterm is run from. You can use the
- command: path('C:') in the auto-load macro or:
- %path('C:') on a function key to change the default directory to
- a "C" ramdisk (as I do) for example. If you do this, make sure
- all other files such as setup files are there also or you will
- have to switch directories back and forth at the proper times.
-
- I will also apologize here for the convoluted code. I'm not a
- programer although I enjoyed mastering this editor without much
- help from the documentation and poor examples (parts of which
- don't appear to work). You will see some labels out of order
- and probable to expert eyes, some wasted code. I have added
- features to these macros as they grew on me but didn't always
- renumber lines. If nothing else, these should get you further
- down the learning curve than the original documentation got me.
- I played with these for 2 years before I got Uniterm's editor to
- work properly for me.
-
- The three files here:
-
- BBSDIAL.MAC
- This is a generic auto-login with re-dial that is prompted for
- the user to enter the number of times re-dials will be attempted
- after the first dial fails. This is the simplest of the three
- files.
-
- Listed here is a copy of the file as reference. I may include
- additional comments in brackets "[ ]" here that are not permitted
- in the macros that you can run. I have also filled some of the
- blank entry lines with X's or examples that will not work if you
- try to run the macros by removing them from this file.
- >>>>>>>>>>>>>>>>>>>>>>>START EXAMPLE ONE>>>>>>>>>>>>>>>>>>>>>>>
- # This is a general purpose BBS auto-dial. Edit modem codes, login, and setup
- # files for your purposes. Remember...macro must not exceed 4k, speed of code
- # transmission is determined by transfer rate in ASCII transfer menu.
- # Control-C can abort between commands.
- me('Loading Uniterm set up File') w(10)
- loadsetup('uniterm.set') w(10) [THIS IS THE DEFAULT SETUP]
- # Following are modem codes:
- se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n')
- # This macro will redial w/prompt for retry number.
- me('Dialing MY FAVORITE BBS. Will re-dial w/prompt for retries') w(10)
- se('atdt9990000\r\n') w(05) set(1,1) set(2,0)
- # Following is looking for first message from online to respond to.
- if(!get('CONNECT',21)) ju(1) [IF YOUR MODEM DISPLAYS THIS
- MESSAGE UPON CONFIRMING CONNECTION. IF NOT, YOU MAY WANT TO USE
- THE FIRST SYSTEM PROMPT YOU GET]
- :7
- # Put log-on codes here. Put prompt text in "get", response in "send".
- ge('HIT RETURN',10) w(05) se('\R\N')
- ge('YOUR NAME',10) me('YOU MIGHT HAVE TO WAIT HERE') w(05)
- se('MARY OR TOM') ge('Enter ID Number',15) w(20) se('9999999\r\n')
- ge('Enter Your Password:',15) w(05) se('ZXZXZ\r\n')
- #Start history and exit. [WHEN THE LAST LOGIN PROMPT IS
- SATISFIED, THE SCREEN HISTORY IS TURNED ON AND THE MACRO ENDS
- YOU CAN CONTINUE AT THIS POINT WITH YOU FIRST MENU SELECTIONS AND
- AUTO DOWNLOADS OR MESSAGE BASE SCANS HERE. I ALWAYS DO THIS
- MANUALLY BECAUSE I NEVER DO IT THE SAME]
- history(1) me('History recording is ON') w(20) exit(0)
- :1
- # 1st fail and re-dial message. [THIS IN INVOKED WHEN "CONNECT"
- FAILS]
- ec('\r\n') ec('Failed!\r\n') w(05)
- if(!input('Retries? Enter #1-?+Ret. or Cancel')) ec('Quit!\n') exit(0)
- # Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
- # Use # in $T to set re-try counter.
- set(1,.$T)
- # place number in "Wait" command 3 seconds less than re-dial timeout.
- me('Re-dial in 30 seconds.') w(270) [I DO THIS BECAUSE OF MY 3
- SECOND ALT-C ABORT MESSAGE] (*)
- :2
- # Re-dial count, display, and check follows: @1= retry countdown @2=retry#
- # "$T"=current retry display count.
- # Display total remaining user re-tries on next line:
- ec("@1) ec(' re-dial remains:\r\n') w(05)
- set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n')
- me('Re-dialing MY FAVORITE BBS. Cntrl-C aborts. NOW!') w(30) (*)
- me('Dialing...') send('atdt \r\n') [PUT THE SAME NUMBER
- HERE AS ABOVE]
- # Timeout for re-dial and success/fail. "ju(4)"=fail
- if(!ge('CONNECT',21)) ec('\r\n') ju(4)
- # If success, will return to log-in code near beginning.
- ju(7)
- :4
- # Look for count in @1 for "0". If not, re-dial.
- # If so, prompt for more retries.
- if(com("@1','0')) ca(5)
- # Failed and redial message for all until last prompt.
- ec('Failed!\r\n') w(10) se('\n') me('Re-dial in 30 sec.') w(270) ju(2)
- :5
- # Prompt to try again or stop and end macro.
- ec('Failed! More retries?\r\n') w(05) se('\n')
- # User clicks "OK" will loop re-dial routine.
- # Prompt for re-try #. "set" for variable int. @1 to # entered by user.
- # If "cancel is clicked, message, and end.
- if(input('Retries failed. Try again? Enter #-
- RET.')) ju(6) [THIS IS WERE THE USE GETS TO TELL THE MACRO HOW
- MANY TIMES TO RE-DIAL THE BBS OR CANCEL AND END THE MACRO]
- ec('ALL RETRIES FAILED! FINISHED.\r\n') w(10) exit(0)
- :6
- # Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
- # Make "set" for variable "@1" user number.
- w(05) set(1,.$T) ju(2)
- [REMEMBER THIS MACRO WILL NOT RUN AS IS]
- >>>>>>>>>>>>>>>>>>>>>>>END EXAMPLE ONE<<<<<<<<<<<<<<<<<<<<<<<<<
-
- GENIEX.MAC
-
- This is the macro I use to dial and log on to GEnie with Uniterm.
- Less editing will be needed here as my prompts will be similar to
- yours. Remember you can use function keys to call macros to do
- the complicated message, file, and mail tasks on GEnie. I most
- often use the function keys to send the one letter or word
- commands I use most often. I have one function key that calls a
- macro that displays a section of character faces for me to select
- from to send at frivolous moments.
- >>>>>>>>>>>>>>>>>>>>>>START EXAMPLE TWO<<<<<<<<<<<<<<<<<<<<<<<<<<
-
- #This macro will load a customized GEnie set-up file and dial w/login.
- #Be sure control codes sent to modem are correct for your equipment.
-
- me('Setting modem echo to OFF,timeout to 17 sec.') w(20)
- se('atz\r\n') w(10) se('ate0\r\n') w(10) se('ats7=17\r\n') w(10)
- me('Loading GEnie set-up file') w(05) Loadsetup('genie.set')
- #This macro will redial w/prompt for retry number.
- me('Dialing GEnie BBS. Will re-dial w/prompt for retries') w(20)
- #The following code contains the phone number and sets re-dial countdown:
- se('atdt \r\n') w(05) set(1,1) set(2,0)
- #Following looking for first message from online to respond to:
- if(!get('CONNECT',20)) ca(1)
- #Put log-on codes here.
- W(10) se('h') w(05) se('h') w(05) se('h\n')
- get('U#=',10) w(10)
- send(' , \r\n') w(10)
- #Start history and end macro.
- history(1) me('History recording is on') w(20) exit(0)
- :1
- #1st fail and re-dial message.
- ec('Failed!\r\n') w(05) se('\n')
- #If # and OK, go on (User enters num. of times to re-dial). If Cancel, exit.
- if(!input('Retries? Enter #1-?+Ret. or Cancel')) ec('Quit!\n') exit(0)
- #Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
- #Use # in $T to set re-try counter.
- set(1,.$T)
- #Place number in "Wait" command 3 seconds less than re-dial timeout.
- me('Re-dial in 30 seconds.') w(270)
- :2
- #Re-dial count, display, and check follows: @1= retry countdown @2=retry#,
- #"$T"=current re-try display count.
- #Display total remaining user re-tries on next line:
- ec("@1) ec(' re-dial remains:\n') w(05)
- set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n')
- mess('Re-dialing GEnie BBS. Cntrl-C aborts. NOW!') w(30)
- me('Dialing...') send('atdt \r\n')
- #Timeout for re-dial and success/fail. "ju(4)"=fail
- if(!ge('CONNECT',35)) ju(4)
- #If success, will return to log-in code near beginning.
- return( )
- :4
- #Look for count in @1 for "0". If not, re-dial.
- #If so, prompt for more retries.
- if(com("@1','0')) ju(5)
- #Failed and redial message for all until last prompt.
- ec('Failed!\r\n') w(10) se('\n') me('Re-dial in 30 sec.') w(270) ju(2)
- :5
- #Prompt to try again or stop and end macro.
- ec('Failed! More retries?\r\n') w(05) se('\n')
- #User clicks "OK", will loop re-dial routine.
- #Prompt for re-try #. "set" for variable int. @1 to # entered by user.
- #If "Cancel" is clicked, message, and end.
- if(input('Retries failed. Try again? Enter#1-?')) ju(6)
- ec('ALL RETRIES FAILED! FINISHED.\r\n') w(10) exit(0)
- :6
- #Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\n') exit(0)
- #Make "set" for variable "@1" user number.
- w(05) set(1,.$T) ju(2)
- [REMEMBER THIS MACRO WILL NOT RUN AS IS]
- >>>>>>>>>>>>>>>>>>>>>>>>>END EXAMPLE TWO<<<<<<<<<<<<<<<<<<<<<<<<<
-
- MLTIDIAL.MAC
-
- This is the most complicated of the three because I use it to
- dial through each number of a multi-line BBS to direct access
- those lines. The board that I call with this particular macro
- also happens to have the nasty attribute of being a Unix based
- system that cannot get the baud rate from the modem report, but
- must "learn" it from sampling a series of carriage returns. Also
- Unix doesn't like line feeds. If these features help you with
- problems similar the the ones I've had with these boards, it's
- good that I left them in here. If not, all the associated code
- will have to be removed and replaced with the logon sequence that
- is appropriate for your needs. When I use this with Unix I also
- make sure carriage returns do not include line feeds in the
- "Terminal 1" perameter menu of the setup file that is loaded in.
-
- If you use this to access multi-line systems and don't need to
- call as many lines, delete the "Dialing Port X" lines from the
- bottom up until you have the total number of lines you want to
- access. You will also have to edit the "set" number in the
- fourth line of label #5 to one number greater than the total
- number of different phone numbers. Also "set" in line seven near
- the beginning of the file to the same number of different
- numbers. The number in the "ATDT" command in line seven must be
- the same as the first line of the multiple number list. I know
- you expert programmers will cringe as all this but I've made my
- excuses. This could save the average person hours of
- experimenting as I have.
-
- Note: You may have noticed in most of these commands that I've
- abbreviated the commands to only a couple of letters to save file
- space. This may be confusing to those who are not familiar with
- the words these letters represent. I suggest you have a print
- out of the Uniterm macro editor file in the Uniterm documentation
- to refer to while de-ciphering these files.
-
- <<<<<<<<<<<<<<<<<<<<<<START EXAMPLE THREE>>>>>>>>>>>>>>>>>>>>>
-
- # This macro will dial multiple numbers for multi-line BBS's and
- # prompt for re-tries. Edit modem codes, login, and setup file names.
- me('Loading BBS set-up file') w(05) loadsetup(' .set') w(05)
- se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n') w(10)
- me('Dialing BBS. Will re-dial w/# cycle')
- # Set 1 must be equal to entries in redial list. Dial and login follows:
- se('atdt \r\n') w(05) set(1,8) set(2,0) set(3,0)
- # If "CONNECT", 3 Crs and log in. If not, "FAILED!" + re-dial.
- if(!get('CONNECT',20)) ju(1)
- :7
- # Put login code here. Carriage returns, no line feeds for Unix.
- # Edit codes for your purposes.
- # Send up to 8 Cr's, hangup, try next #. If ok, login.
- ec('\r\nSending carriage returns...\r\n') w(50)
- ec('1\r\n') se('\r') w(40) ec('2\r\n') se('\r')
- ec('Should get system message here. If not, more Cr`s\r\n')
- if(!ge('login:',04)) ec('3\r\n') se('\r') if(!ge('login:',04)) ju(9)
- :8
- # Name here if connect is successful and get 1st prompt.
- w(05) se(' \r')
- # Password code here
- ge('Your password:',60) w(05) se(' \r')
- # login is successful and screen history is turned on. End macro.
- history(1) me('History recording is on') w(20) exit(0)
- :1
- # If @1 is "0", jump to (5), prompt for re-tries. Otherwise, dial alts.
- if(!or(@1,0)) Ju(5)
- # Fail and re-dial timeout.
- if(com('1',"@3')) me('Will dial in 30 seconds.') w(270) ju(2)
- ec('Failed!\r\n') ec('\n') me('Re-dial in 15 seconds.') w(120)
- :2
- # Re-dial count, display, and check follows: @1= retry countdown @2=retry#
- set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n')
- :3
- # Re-dial with 7 alternate numbers:
- # First time, 1st # (8) is skipped so num. in top row should be same as
- # num. already dialed above.
- # #s must be in order bottom-to-top with '1' in bottom "com" argument.
- me('Re-dialing Eskimo N. BBS. Cntrl-C aborts. NOW!') w(30)
- if(com("@1','8')) me('Dialing port 1') se('atdt \r\n')
- if(com("@1','7')) me('Dialing port 2') se('atdt \r\n')
- if(com("@1','6')) me('Dialing port 3') se('atdt \r\n')
- if(com("@1','5')) me('Dialing port 4') se('atdt \r\n')
- if(com("@1','4')) me('Dialing port 5') se('atdt \r\n')
- if(com("@1','3')) me('Dialing port 6') se('atdt \r\n')
- if(com("@1','2')) me('Dialing port 7') se('atdt \r\n')
- if(com("@1','1')) me('Dialing port 8') se('atdt \r\n')
- # If no "CONNECT", check count, and re-dial. If yes, return to login.
- if(get('CONNECT',20)) ju(7)
- :4
- # Check if @1 = "1". If so, prompt to re-try or quit. If not, re-dial.
- if(com("@1,'1')) ju(5)
- ec('\nFailed!\r\n') w(10) me('Re-dial in 15 sec.') w(120) ju(2)
- :5
- # Prompt to try again or end macro.
- ec('Failed! More retries?\r\n') w(05)
- # Set @1 must be one more than # of re-dial entries in list.
- if(input('All Failed. Try Again? OK or Cancel')) set(1,9) ju(2)
- ec('FINISHED.\r\n') w(10) exit(0)
- :6
- # If no response after connect, "FAILED!", hangup, dial next #.
- ec('No Response. Will hangup!\r\n') w(20) drop( ) w(05) assert( ) w(05)
- # Check if @1 = "1". Yes, prompt to re-try or quit. No, re-dial.
- if(com("@1,'1')) ju(5)
- ec('\r\n') ju(1)
- :9
- # Send more Cr's and check for response. May have to edit prompts.
- ec('4\r\n') set(3,0) se('\r')
- if(!ge('login:',04)) ec('5\r\n') se('\r') if(!ge('login:',04)) ju(10)
- ju(8)
- :10
- ec('6\r\n') se('\r')
- if(!ge('login:',04)) ec('7\r\n') se('\r') if(!ge('login:',04)) ju(11)
- ju(8)
- :11
- se('\r') ec('Sent 8th Carriage Return. Hangup if no go.\r\n')
- # Set #3 changes 20 sec. timeout to 30. Ju(6)=hang+dial next. (8)=login
- if(!ge('login:',04)) set(3,1) ju(6)
- ju(8)
- [REMEMBER THIS MACRO WILL NOT RUN AS IS]
- >>>>>>>>>>>>>>>>>>>>>>>>>>>END EXAMPLE THREE<<<<<<<<<<<<<<<<<<<<<<
-
- I will be happy to answer any questions you have concerning these
- examples of anything else I've learned about Uniterm. I think
- it's the best PD terminal emulator for the ST and beats most made
- for any other computer.
-
- Paul Varn
- GEnie: pvarn
- 2/18/90
- ---------------------------- END FILE ----------------------------
-
-